{% extends "base.html" %}
{% block pagetitle %}{{MSG_HP_TITLE}}{% endblock %}
{% block content %}

<table style="margin-left:15px"><tr><td width=700px>

<div>
<br>
<br>
<div class="art-box" align=left> 
<form action="/createrequest" method="get"> 
<input type=submit value="{{MSG_HP_CREATE_REQUEST}}">  {{MSG_HP_WILL_VERIFY_REQUEST}}
</form>
</div>

{% if open_reqs %}
<h2>{{MSG_HP_FUNDING_ORDERS}}:</h2>
<table class="art-table">
  <thead>
    <tr class="header">
      <td width=100%><b>{{MSG_HP_NAME}}</b></td>
      <td align=right><b>{{MSG_HP_CREATION_DATE}}</b></td>
    </tr>
  </thead>
  <tbody>
    {% for req in open_reqs %}
    <tr class="{% cycle row1,row2 %}">
      <td><a href="/viewrequest?qid={{ req.key }}">{{req.item_name }}</a>
          [<span class="grey_link"><a href="/profile?id={{req.creator.key}}">{{req.creator.nickname}}</a></span>]</td>
      <td>{{req.creation_date_str }}</td>
    </tr>
    {% endfor %}
   <tr><td colspan=2 align=right><a href="">{{MSG_HP_MORE}}&gt;&gt;</a></td></tr>
  </tbody>
</table>
{% endif %}

<br>
{% if funded_reqs %}
<h2>{{MSG_HP_OPEN_ORDERS}}:</h2>
<table class="art-table">
  <thead>
    <tr class="header">
      <td width=100%><b>{{MSG_HP_NAME}}</b></td>
      <td align=right><b>{{MSG_HP_ESTIMATED_COST}}</b></td>
    </tr>
  </thead>
  <tbody>
    {% for req in funded_reqs %}
    <tr class="{% cycle row1,row2 %}">
      <td><a href="/viewrequest?qid={{ req.key }}">{{req.item_name }}</a>
          [<span class="grey_link"><a href="/profile?id={{req.creator.key}}">{{req.creator.nickname}}</a></span>]</td>
      <td align=right>{{req.estimated_price }}</td>
    </tr>
    {% endfor %}
    <tr><td colspan=2 align=right><a href="">{{MSG_HP_MORE}}&gt;&gt;</a></td></tr>
  </tbody>
</table>
{% endif %}
<br>
{% if ship_reqs %}
<h2>{{MSG_HP_ORDERS_IN_SHIPMENT}}:</h2>
<table class="art-table">
  <thead>
    <tr class="header">
      <td width=100%><b>{{MSG_HP_NAME}}</b></td>
      <td align=right><b>{{MSG_HP_COST}}</b></td>
    </tr>
  </thead>
  <tbody>
    {% for req in ship_reqs %}
    <tr class="{% cycle row1,row2 %}">
      <td><a href="/viewrequest?qid={{ req.key }}">{{req.item_name }}</a>
          [<span class="grey_link"><a href="/profile?id={{req.creator.key}}">{{req.creator.nickname}}</a></span>]</td>
      <td align=right>{{req.estimated_price }}</td>
    </tr>
    {% endfor %}
    <tr><td colspan=2 align=right><a href="">{{MSG_HP_MORE}}&gt;&gt;</a></td></tr>
  </tbody>
</table>
{% endif %}
<br>
{% if closed_reqs %}
<h2>{{MSG_HP_ORDERS_FULFILLED}}:</h2>
<table class="art-table">
  <thead>
    <tr class="header">
      <td width=100%><b>{{MSG_HP_NAME}}</b></td>
      <td align=right><b>{{MSG_HP_COST}}</b></td>
    </tr>
  </thead>
  <tbody>
    {% for req in closed_reqs %}
    <tr class="{% cycle row1,row2 %}">
      <td><a href="/viewrequest?qid={{ req.key }}">{{req.item_name }}</a>
          [<span class="grey_link"><a href="/profile?id={{req.creator.key}}">{{req.creator.nickname}}</a></span>]</td>
      <td align=right>{{req.estimated_price }}</td>
    </tr>
    {% endfor %}
    <tr><td colspan=2 align=right><a href="">{{MSG_HP_MORE}}&gt;&gt;</a></td></tr>
  </tbody>
</table>
{% endif %}
<br>
{% if pending_reqs %}
<h2>{{MSG_HP_UNVERIFIED_ORDERS}}:</h2>
<table class="art-table">
  <thead>
    <tr class="header">
      <td width=100%><b>{{MSG_HP_NAME}}</b></td>
      <td align=right><b>{{MSG_HP_CREATION_DATE}}</b></td>
    </tr>
  </thead>
  <tbody>
    {% for req in pending_reqs %}
    <tr class="{% cycle row1,row2 %}">
      <td><a href="/viewrequest?qid={{ req.key }}">{{req.item_name }}</a>
          [<span class="grey_link"><a href="/profile?id={{req.creator.key}}">{{req.creator.nickname}}</a></span>]</td>
      <td>{{req.creation_date_str }}</td>
    </tr>
    {% endfor %}
   <tr><td colspan=2 align=right><a href="">{{MSG_HP_MORE}}&gt;&gt;</a></td></tr>
  </tbody>
</table>
</div>
</td>
<td valign=top style="line-height:2;padding-left:50px;padding-top:100px">
<h2>{{MSG_HP_DONORS}}:</h2>
{% for donor in donors %}
<a href="/profile?id={{donor.creator.key}}">{{donor.name}}</a><br>
{% endfor %}
<a href="">{{MSG_HP_MORE}}&gt;&gt;</a><br>
<br>
<br>
<h2>{{MSG_HP_MANUFACTURERS}}:</h2>
{% for man in manufacturers %}
<a href="/profile?id={{man.creator.key}}">{{man.name}}</a><br>
{% endfor %}
<a href="">{{MSG_HP_MORE}}&gt;&gt;</a><br>
</td></tr></table>
{% endif %}
{% endblock %}
